package com.edu.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/*
 * @Author:princess
 * @Date 2023/12/6 12 06 19:15
 *
 */
@Controller
public class UserController {
    @RequestMapping("/login")
    public String exception(@RequestParam String username){
        System.out.println(username);
        return "index";
    }

    @RequestMapping("/login2")
    @ResponseBody
    public Object exception02(@RequestParam String username){
        System.out.println(username);
        return "success";
    }
}
